package com.cxf.windex.enums;

/**
 * @program: business_needs
 * @description: 订单状态
 * @author: chenxf
 * @create: 2018-11-07 16:41
 **/
public enum  OrderTypeEnum {
  UNDONE("2", "未完成"),
  TOBEPROCESSED("0", "待处理"),
  PENDINGREVIEW("3", "审核中"),
 // APPEAL("4", "申诉中"),
  CLOSED("1", "已完成");


  private final String key;
  private final String desc;

  private OrderTypeEnum(String key, String desc) {
    this.key = key;
    this.desc = desc;
  }

  public static OrderTypeEnum getIdType(String idType) {
    OrderTypeEnum[] its = values();
    OrderTypeEnum[] arr$ = its;
    int len$ = its.length;

    for(int i$ = 0; i$ < len$; ++i$) {
      OrderTypeEnum it = arr$[i$];
      if (it.getKey() .equals( idType)) {
        return it;
      }
    }

    return TOBEPROCESSED;
  }

  public String getKey() {
    return this.key;
  }

  public String getDesc() {
    return this.desc;
  }
}
